<?php
namespace Amis\dataviewer;

use Amis\Basics\AmisBasics;

class iFrame extends AmisBasics
{
    public string $type = 'iframe';

    /**
     * iFrame 的类名
     * @param string $className
     * @return $this
     */
    public function className(string $className)
    {
        $this->className = $className;
        return $this;
    }

    /**
     * @param array $frameBorder
     * @return $this
     */
    public function frameBorder(array $frameBorder)
    {
        $this->frameBorder = $frameBorder;
        return $this;
    }

    /**
     * 样式对象
     * @param array $style
     * @return $this
     */
    public function style(array $style)
    {
        $this->style = $style;
        return $this;
    }

    /**
     * iframe 地址
     * @param string $src
     * @return $this
     */
    public function src(string $src)
    {
        $this->src = $src;
        return $this;
    }

    /**
     *iframe 高度
     * @param $height
     * @return $this
     */
    public function height($height = '100%')
    {
        $this->height = $height;
        return $this;
    }

    /**
     * iframe 宽度
     * @param string $width
     * @return $this
     */
    public function width($width = '100%')
    {
        $this->width = $width;
        return $this;
    }
}